package com.sky.mapper;

import com.sky.entity.ShoppingCart;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface ShoppingCartMapper {

    /**
     * 查询购物车
     *
     * @param shoppingCart
     * @return
     */
    List<ShoppingCart> queryList(ShoppingCart shoppingCart);

    /**
     * 根据id增加数量
     *
     * @param shoppingCart
     * @return
     */
    void updateNumById(ShoppingCart shoppingCart);

    /**
     * 新增菜品或套餐
     *
     * @param shoppingCart
     * @return
     */
    void insert(ShoppingCart shoppingCart);

    /**
     * 删除购物车的商品
     *
     * @param shoppingCart
     * @return
     */
    void delete(ShoppingCart shoppingCart);
}
